<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <title>Document</title>
    <style>
        form{
            width:300px;
            height: 300px;
            margin: 100px auto;
            border: 1px solid black;
            padding: 20px;
        }
    </style>
</head>
<body>
    <form action="">
        用户名:<input type="text" onblur="jiaoyan()" id="username">
        <br>
        密码:&nbsp;&nbsp;&nbsp;<input type="password">
        <br>
        性别：<input type="checkbox" name="sex">男
                <input type="checkbox" name="sex">女<br>
        学历：<input type="checkbox" name="xueli">本科 
        <input type="checkbox" name="xueli">专科
        <br>
        自我介绍：<textarea id="content" rows="10" cols="15">

                 </textarea>
                 <br>
                 <input type="submit" onclick="submited()" value="提交">
    </form>
    <script>
        function jiaoyan(){
            var name=document.getElementById("username").value;
            if(name!=="admin"){
                alert("用户名输入错误");
            }
        }
        function submited(){
            var content=document.getElementById("content").value;
            alert(content);
            return true;
          
        }
    </script>
</body>

</html>